package com.tencent.qf.bascic.controller;

import com.tencent.qf.bascic.api.SCRMService;
import com.tencent.qf.bascic.api.dto.SendMsgDTO;
import com.tencent.qf.bascic.api.dto.SendMsgRequest;
import com.tencent.qf.common.aspect.annotation.ApiLog;
import com.tencent.qf.common.pojo.HttpResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * @author: p_haojiawu@tencent.com
 * @date: 2023-02-07 18:40
 **/
@RestController
@RequestMapping("/api/bascic")
public class SendMsgController {

    @Resource
    private SCRMService scrmService;

//    @Signature
    @ApiLog("发送企业微信")
    @PostMapping("/sendMsg")
    public HttpResult<List<SendMsgDTO>> sendMsg(@RequestBody @Valid SendMsgRequest request){
        return scrmService.sendMsg(request);
    }
}
